/**
 * 
 */
package org.tcp.client.exception;

/**
 * @author kucheng.liao@autonavi.com
 * @Date Sep 19, 2014
 */
public class PoolException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1662026897825757950L;

	private ExceptionEnum exceptionEnum;

	public PoolException(ExceptionEnum exceptionEnum) {
		this.exceptionEnum = exceptionEnum;

	}
	
	public PoolException(Exception e){
		super(e);
	}

	@Override
	public String toString() {
		if (null != exceptionEnum) {
			return exceptionEnum.toString();
		}else{
			return super.toString();
		}
	}

}
